package fr.labri.harmony.analysis.jsep;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Basic;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import fr.labri.harmony.core.model.Data;

@Entity
class CandidateMigration implements Data{
	
	@Basic
	String source;
	@Basic
	String target;
	
	@Basic
	String rev_start;
	@Basic
	String rev_end;
	
	@ElementCollection
	private List<String> interm = new ArrayList<String>();
	
	private int elementId;

	private int elementKind;

	@Id
	@GeneratedValue
	private int id;

	@Override
	public int getElementId() {
		return elementId;
	}

	@Override
	public void setElementId(int id) {
		this.elementId=id;
	}

	@Override
	public int getElementKind() {
		return elementKind;
	}

	@Override
	public void setElementKind(int kind) {
		this.elementKind = kind;
	}

	public CandidateMigration(){
		
	}
	
	public CandidateMigration(String source, String target, String rev_start, String rev_end, List<String> interm) {
		super();
		this.source = source;
		this.target = target;
		this.rev_start = rev_start;
		this.rev_end = rev_end;
		this.interm = interm;
	}
	
	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getRev_start() {
		return rev_start;
	}

	public void setRev_start(String rev_start) {
		this.rev_start = rev_start;
	}

	public String getRev_end() {
		return rev_end;
	}

	public void setRev_end(String rev_end) {
		this.rev_end = rev_end;
	}

	public List<String> getInterm() {
		return interm;
	}

	public void setInterm(List<String> interm) {
		this.interm = interm;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Override
	public String toString(){
		return source +" => " + target + "["+rev_start+","+rev_end+"]";
	}
}
